package com.tjetc.dao;

import com.tjetc.domain.Medicine;
import com.tjetc.utils.PageInfo;

import java.sql.SQLException;
import java.util.List;

public interface MedicineDao {
    int getCount(String name) throws SQLException;

    List<Medicine> list(String name, PageInfo<Medicine> pageInfo) throws SQLException;

    void add(Medicine medicine) throws SQLException;

    int findMaxId() throws SQLException;

    void update(Medicine medicine) throws SQLException;
    void cutDown(int id,int num) throws SQLException;

    void delById(int id) throws SQLException;

    List<Medicine> listAll() throws SQLException;

    Medicine getById(int id) throws SQLException;

    Medicine findByName(String name) throws SQLException;
}
